﻿using Abp.Runtime.Validation;

namespace Hicap.QRCodeWarehouse.Application.Dto.Common
{
    public class QueryInput : PagedAndSortedInputDto, IShouldNormalize
    {
        public QueryInput()
        {
            Filter = new InputFilter();
        }

        ////BCC/ BEGIN CUSTOM CODE SECTION
        ////ECC/ END CUSTOM CODE SECTION
        /// <summary>
        /// 模糊搜索使用的关键字
        /// </summary>
        public InputFilter Filter { get; set; }

        /// <summary>
        /// 正常化排序使用
        /// </summary>
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "Id";
            }
        }
    }
}